#ifndef __MT6701_H
#define __MT6701_H

#include "at32f415_wk_config.h"

#define COUNT_PER_ROTATE  16384  // 编码器分辨率

#define _2PI 6.28318530718f
#define _PI 3.14159265358f

/*
初始化MT6701
*/
uint8_t MT6701_init(void);
/*
读取MT6701角度
*/
uint8_t MT6701_ReadAngleSPI(uint16_t *angle_raw);
/*
读取MT6701角度并转换成角度
*/
uint8_t MT6701_get_angle(uint16_t *angle_raw, float *angle_f);

#endif
